package survey.dao.impl;

import java.util.List;

import org.springframework.orm.ibatis.SqlMapClientTemplate;

import survey.dao.AnswerDao;
import survey.entity.Answer;

public class AnswerDaoImpl extends SqlMapClientTemplate implements AnswerDao {
	private SqlMapClientTemplate sqlMapClientTemplate;

	public SqlMapClientTemplate getSqlMapClientTemplate() {
		return sqlMapClientTemplate;
	}

	public void setSqlMapClientTemplate(
			SqlMapClientTemplate sqlMapClientTemplate) {
		this.sqlMapClientTemplate = sqlMapClientTemplate;
	}

	public List<Answer> queryAnserByQId(int qId) {
		return (List<Answer>) sqlMapClientTemplate.queryForList("getAnswerByQId", qId);
	}
}
